package com.jiazhong.异常;

import java.util.InputMismatchException;
import java.util.Scanner;

public class Demo01 {
    public static void main(String[] args) {
        int m[]={0,1,2,3,4,5};
        try {
            for (int i=0;i<=m.length;i++){
                System.out.println(m[i]);
            }
        }
        catch (ArrayIndexOutOfBoundsException e){
            System.out.println("下标越界");
            e.printStackTrace();
        }


        System.out.println("程序结束");
    }
}
